<template>
        
    <!--中间部分-->
    <div id="ccenter">
        <h2>班级教材</h2>
        <el-table :data="tableData" @selection-change="changeFun" :header-cell-style="{'text-align':'center'}" :cell-style="{'text-align':'center'}" style="width: 100%;">
            <el-table-column type="selection" width="50"></el-table-column>
            <el-table-column prop="" label="封面">
                <template slot-scope="scope">
                    <img :src="scope.row.coverUrl" width="100px" height="100px" alt="">
                </template>
            </el-table-column>
            <el-table-column prop="bookName" label="书名"></el-table-column>
            <el-table-column prop="isbn" label="书号"></el-table-column>
            <el-table-column prop="author" label="作者"></el-table-column>
            <el-table-column prop="unitPrice" label="定价"></el-table-column>
            <el-table-column prop="press" label="出版社"></el-table-column>
        </el-table>
        <div class="foot">
            <div style="float:right; margin-top:5px;">
                <label>已选{{count}}件，共计{{money}}</label>
                <el-button type="danger">结算</el-button>
            </div>
        </div>
    </div>
</template>

<script>

import '@/style/css/home.css'
import $ from 'jquery'

export default {
    name:'Class',
    data() {
    return {
      count:0,
      money:0.00,
      multipleSelection:[],
      tableData: [
        {
          coverUrl: "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1262609278,82515806&fm=26&gp=0.jpg",
          bookName: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        },
        {
          coverUrl: require("@/style/images/logo.png"),
          bookName: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄"
        },
        {
          coverUrl: "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1279115144,2362469614&fm=26&gp=0.jpg",
          bookName: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄"
        },
        {
          coverUrl: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2125785926,1579346115&fm=26&gp=0.jpg",
          bookName: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄"
        }
      ]
    };
  },
  methods:{
    changeFun:function(val){
        this.multipleSelection=val;
        console.log(this.multipleSelection);
    },
  }
}
</script>

<style>
    .foot{
        width: 100%;
        background-color: darkgrey;
    }
</style>